@import './boostrap-custom.scss';
@import './fonts.scss';
@import './variables.scss';

// custom scrollbar
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background: darken($gray-900, 4%);
  border-radius: 20px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 20px;
}

// ace editor custom scrollbar
.ace_scrollbar.ace_scrollbar-v::-webkit-scrollbar-thumb {
  background: lighten($gray-900, 5%);
}

::selection {
  background: $blue;
}

html {
  // reduce page size reduce everything in bootstrap
  font-size: 14px;
}

body {
  user-select: none;
  cursor: default;
  overflow: hidden;
  letter-spacing: 0.02rem;
}

html,
body {
  height: 100vh;
}

select,
input,
.btn,
.dropdown-item {
  transition: all ease-in-out 100ms;
}

.h-35 {
  max-height: 35%;
}

.main-content {
  background-color: darken($gray-900, 2%);
}

.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.environments-menu-container {
  width: $environment-menu-width;
}

.column-width {
  min-width: $menu-width;
  max-width: $menu-width;
}

.menu-list {
  overflow-x: hidden;
  overflow-y: auto;

  .nav-item {
    box-shadow: inset 0 -1px 0 0 lighten($gray-900, 3%);
  }
}

.menu-header {
  box-shadow: inset 0 -1px 0 0 lighten($gray-900, 3%);
}

.menu-subtitle {
  color: $gray-500;
  font-size: $small-font-size;
}

.scroll-content {
  overflow-x: hidden;
  overflow-y: scroll;
}

.doc-link {
  cursor: pointer;
  opacity: 0.5;
  padding: 0;
  vertical-align: baseline;

  &:hover {
    opacity: 1;
  }
}

// http methods badges
$http-methods: ('get', $blue), ('put', $orange), ('post', $green),
  ('delete', $red), ('head', $purple), ('patch', $teal), ('options', $dark-blue);
@each $method in $http-methods {
  .http-method-#{nth($method, 1)} {
    background-color: #{nth($method, 2)};
    color: $gray-900;
  }
}

.header {
  background-color: lighten($gray-900, 3%);
}

.footer {
  color: $gray-400;
  background-color: lighten($gray-900, 5%);
  z-index: 15;

  .footer-item {
    padding: $spacer / 4 $spacer;
    display: inline-block;
    transition: all ease-in-out 200ms;
    cursor: pointer;

    &.lighter {
      color: $gray-200;
    }

    &.with-border-left {
      border-left: 1px solid lighten($gray-900, 5%);
    }

    &.with-border-right {
      border-right: 1px solid lighten($gray-900, 5%);
    }

    &:first-of-type {
      border-left: none;
    }
  }
}

.title-separator {
  border-bottom: 1px solid lighten($gray-900, 3%);
  margin-bottom: 1rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  padding-top: 0.25rem;
  margin-top: 1rem;
  color: $gray-400;
  top: -12px;

  &.is-first {
    margin-top: 0;
  }

  &.has-icon {
    border-bottom: none;
    padding-left: 0;

    .title-separator-text {
      margin-left: 22px;
      border-bottom: 1px solid lighten($gray-900, 3%);
      display: flex;

      div:nth-child(2) {
        flex-grow: 1;
        text-align: right;
        font-size: 0.8rem;
        margin-top: 0.2rem;

        .btn-link {
          padding: 0;
          font-size: 0.8rem;
          vertical-align: inherit;
        }
      }
    }

    .title-separator-icon {
      float: left;
    }
  }
}

.transition {
  transition: all ease-in-out 200ms;
}

.dimmed {
  opacity: 0.5;
}

.position-relative {
  position: relative;
}

.flex-fill {
  flex: 1;
}

.form-right {
  position: absolute;
  right: 0;
}

.server-icons {
  position: absolute;
  display: block;
  width: 10px;
  height: 10px;
  opacity: 0.5;

  i {
    font-size: 13px;
  }

  &-proxy-mode {
    right: 8px;
    top: -4px;
    color: $blue;
  }

  &-https {
    right: 8px;
    top: 13px;
    color: $yellow;
  }

  &-cors {
    right: 8px;
    top: 28px;
    color: $cyan;
  }
}

.toasts-container {
  z-index: 5000;
  position: absolute;
  width: 250px;
  top: ($spacer / 2) + 2rem;
  right: $spacer / 2;

  .toast-success {
    .toast-body {
      background-color: $green;
      border-color: lighten($green, 10%);
    }
  }

  .toast-warning {
    .toast-body {
      background-color: $orange;
      border-color: lighten($orange, 10%);
    }
  }

  .toast-error {
    .toast-body {
      background-color: $red;
      border-color: lighten($red, 10%);
    }
  }
}

.headers-list {
  &:first-of-type {
    margin-top: 0;
  }

  margin-top: $spacer / 2;
}

@import '../../node_modules/spinthatshit/src/loaders.scss';

.loader {
  @include loader02(
    $size: 100px,
    $color: $gray-600,
    $border-size: 4px,
    $duration: 0.6s,
    $align: middle
  );
}

.message {
  text-align: center;
  font-size: $font-size-lg;
  color: darken($gray-600, 20%);
  font-weight: $font-weight-light;
}

.pattern-danger {
  position: relative;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    #f3362866 0px,
    #f3362866 16px
  );
}
